<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>MyKit</title>
    <link href="css/default.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/knockout.js"></script>
    <style type="text/css">
        html, body {
            margin: 0;
            padding: 0;
            height: 99%;
        }
        .layout {
            height: 100%;
            width: 100%;
        }
        .layout table, tr, td, object {
            height: 100%;
            width: 100%;
        }
    </style>
    <hta:application id="MyKit" applicationname="MyKit" border="thin" borderstyle="raised" caption="yes" innerborder="no" contextmenu="yes"
        maximizebutton="yes" minimizebutton="yes" sysmenu="yes" selection="yes" showintaskbar="yes" scroll="yes" scrollflat="yes"
        singleinstance="yes" windowstate="Normal" />
    <script type="text/javascript">
        function MyKitViewModel() {
            var self = this;
        }

        $(function () {
            var tree = $('#tree')[0];
            tree.Nodes.Clear();
            var Root = tree.Nodes.Add();
            Root.Text = "root";
            Root.key = "root";
            var Node = tree.Nodes.Add();
            Node.Text = "aaaaaa";
            Node.key = "branch2";
            Node.Parent = Root;
            var Leaf = tree.Nodes.Add();
            Leaf.Text = "bbbbbb";
            Leaf.key = "leaf3";
            Leaf.Parent = Node;

            ko.applyBindings(new MyKitViewModel());
        });
    </script>
</head>
<body bgcolor="#eeeeee">
    <div class="layout">
        <table>
            <tr>
                <td style="width: 20%;">
                    <object id="tree" progid="MSComctlLib.TreeCtrl" classid="clsid:C74190B6-8589-11D1-B16A-00C0F0283628">
                    </object>
                </td>
                <td>
                </td>
            </tr>
        </table>
    </div>
</body>
</html>
